<?php
$data = file_get_contents('sitemap.xml');
$replace = "<lastmod>".date('Y-m-d')."</lastmod>";
$data = preg_replace('/<lastmod>.*<\/lastmod>/', $replace, $data);
header('Content-type: application/xml');
echo $data;
exit;
